import { S } from '../../s';
import { IPSDEUICtrlFireEventLogic } from './ipsdeuictrl-fire-event-logic';
import { IPSDEUILogic } from './ipsdeuilogic';
import { IPSDEUILogicParam } from './ipsdeuilogic-param';
import { PSDEUILogicNodeImpl } from './psdeuilogic-node-impl';

export class PSDEUICtrlFireEventLogicImpl
  extends PSDEUILogicNodeImpl
  implements IPSDEUICtrlFireEventLogic
{
  get eventName(): string {
    return this.M.eventName;
  }

  protected eventparam: IPSDEUILogicParam;
  getEventParam(): IPSDEUILogicParam | null {
    if (this.eventparam != null) return this.eventparam;
    const value = this.M.getEventParam;
    if (value == null) {
      return;
    }
    const ipsdeuilogic = this.getParentPSModelObject(S._206) as IPSDEUILogic;
    if (ipsdeuilogic != null) {
      this.eventparam = ipsdeuilogic.findPSDEUILogicParam(value);
    }
    return this.eventparam;
  }

  protected firectrl: IPSDEUILogicParam;
  getFireCtrl(): IPSDEUILogicParam | null {
    if (this.firectrl != null) return this.firectrl;
    const value = this.M.getFireCtrl;
    if (value == null) {
      return;
    }
    const ipsdeuilogic = this.getParentPSModelObject(S._206) as IPSDEUILogic;
    if (ipsdeuilogic != null) {
      this.firectrl = ipsdeuilogic.findPSDEUILogicParam(value);
    }
    return this.firectrl;
  }

  protected srcpsdeuilogicparam: IPSDEUILogicParam;
  getSrcPSDEUILogicParam(): IPSDEUILogicParam | null {
    if (this.srcpsdeuilogicparam != null) return this.srcpsdeuilogicparam;
    const value = this.M.getSrcPSDEUILogicParam;
    if (value == null) {
      return;
    }
    const ipsdeuilogic = this.getParentPSModelObject(S._206) as IPSDEUILogic;
    if (ipsdeuilogic != null) {
      this.srcpsdeuilogicparam = ipsdeuilogic.findPSDEUILogicParam(value);
    }
    return this.srcpsdeuilogicparam;
  }
  get cls(): string {
    return 'PSDEUICtrlFireEventLogicImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._390) return true;
    return super.instanceof(cls);
  }
}
